using System;
using bitzhuwei.Compiler;

namespace bitzhuwei.GLSLFormat {
    /// <summary>
    /// Correspond to the Vn node simple_statement in the grammar(GLSL).
    /// </summary>
    internal partial class Vnsimple_statement : IFullFormat {
        // [310] simple_statement = declaration_statement ;
        // [311] simple_statement = expression_statement ;
        // [312] simple_statement = selection_statement ;
        // [313] simple_statement = switch_statement ;
        // [314] simple_statement = case_label ;
        // [315] simple_statement = iteration_statement ;
        // [316] simple_statement = jump_statement ;


        private readonly IFullFormat complex;

        private readonly TokenRange _scope;
        public TokenRange Scope => _scope;
        public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
            context.PrintBlanksAnd(this.complex, preConfig, writer);
        }


        // [310] simple_statement = declaration_statement ;
        public Vnsimple_statement(Vndeclaration_statement r0) {
            this.complex = new complex0(r0);
            this._scope = new TokenRange(r0);
        }
        class complex0 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vndeclaration_statement r0;
            public complex0(Vndeclaration_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [311] simple_statement = expression_statement ;
        public Vnsimple_statement(Vnexpression_statement r0) {
            this.complex = new complex1(r0);
            this._scope = new TokenRange(r0);
        }
        class complex1 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vnexpression_statement r0;
            public complex1(Vnexpression_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [312] simple_statement = selection_statement ;
        public Vnsimple_statement(Vnselection_statement r0) {
            this.complex = new complex2(r0);
            this._scope = new TokenRange(r0);
        }
        class complex2 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vnselection_statement r0;
            public complex2(Vnselection_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [313] simple_statement = switch_statement ;
        public Vnsimple_statement(Vnswitch_statement r0) {
            this.complex = new complex3(r0);
            this._scope = new TokenRange(r0);
        }
        class complex3 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vnswitch_statement r0;
            public complex3(Vnswitch_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [314] simple_statement = case_label ;
        public Vnsimple_statement(Vncase_label r0) {
            this.complex = new complex4(r0);
            this._scope = new TokenRange(r0);
        }
        class complex4 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vncase_label r0;
            public complex4(Vncase_label r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [315] simple_statement = iteration_statement ;
        public Vnsimple_statement(Vniteration_statement r0) {
            this.complex = new complex5(r0);
            this._scope = new TokenRange(r0);
        }
        class complex5 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vniteration_statement r0;
            public complex5(Vniteration_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [316] simple_statement = jump_statement ;
        public Vnsimple_statement(Vnjump_statement r0) {
            this.complex = new complex6(r0);
            this._scope = new TokenRange(r0);
        }
        class complex6 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Vnjump_statement r0;
            public complex6(Vnjump_statement r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }



    }
}
